export default ({ store }) => {
  if (process.client) {
    window.addEventListener('beforeinstallprompt', (event) => {
      // Prevent the mini-infobar from appearing on mobile
      event.preventDefault()
      // Stash the event so it can be triggered later.
      store.commit('setInstallPromptEvent', event)
      // console.log('beforeinstallprompt event captured')
    })
  }
}
